from scipy import misc

h = [0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0,
 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0]

'''
c=a[0:5:3] #从第一个位置到第六个位置，每3个取一个值
print(c)
结果：[1, 4]
'''
new_h = [h[0:9:1],h[9:18:1],h[18:27:1],h[27:36:1],h[36:45:1],h[45:54:1],h[54:63:1],h[63:72:1],h[72:81:1],h[81:90:1],h[90:99:1],h[99:108:1],h[108:117:1],h[117:126:1],h[126:135:1],h[135:144:1],h[144:153:1],h[153:162:1],h[162:171:1],h[171:180:1],h[180:189:1],h[189:198:1],h[198:207:1],h[207:216:1]]
   
misc.imsave('D:/PythonPicTemplate/changeView/test-A/6.png', new_h)